/**
 * 
 */
package soa.security.ws;

import soa.security.exception.OrganizationException;
import soa.security.ws.base.OrganizationalIdentityService;

import javax.jws.WebParam;
import javax.jws.WebService;

/**
 * @author CreGu
 *
 */
@WebService
public interface AccountService extends OrganizationalIdentityService {

	/**
	 * 账号信息上报，用于初始化
	 * 
	 * @param organizationId
	 * @param account
	 * @return
	 * @throws OrganizationException
	 */
	public boolean initialize(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "account") String account)
			throws OrganizationException;

	/**
	 * 获取机构内的所有账号信息
	 * 
	 * @param organizationId
	 * @return
	 * @throws OrganizationException
	 */
	public String allAccounts(
			@WebParam(name = "organizationId") String organizationId)
			throws OrganizationException;

	/**
	 * 账号信息修改
	 * 
	 * @param organizationId
	 * @param account
	 * @return
	 * @throws OrganizationException
	 */
//	public boolean updateAccount(
//			@WebParam(name = "organizationId") String organizationId,
//			@WebParam(name = "account") String account)
//			throws OrganizationException;

	/**
	 * 账号密码重置，默认密码888888
	 * 
	 * @param organizationId
	 * @param accountId
	 * @return
	 * @throws OrganizationException
	 */
//	public boolean pwdReset(
//			@WebParam(name = "organizationId") String organizationId,
//			@WebParam(name = "accountId") String accountId)
//			throws OrganizationException;

	/**
	 * 账号密码变更
	 * 
	 * @param organizationId
	 * @param accountId
	 * @param password
	 * @return
	 * @throws OrganizationException
	 */
//	public boolean pwdUpdate(
//			@WebParam(name = "organizationId") String organizationId,
//			@WebParam(name = "accountId") String accountId,
//			@WebParam(name = "password") String password)
//			throws OrganizationException;

	/**
	 * 账号禁用
	 * 
	 * @param organizationId
	 * @param accountId
	 * @return
	 * @throws OrganizationException
	 */
//	public boolean disable(
//			@WebParam(name = "organizationId") String organizationId,
//			@WebParam(name = "accountId") String accountId)
//			throws OrganizationException;

	/**
	 * 账号启用
	 * 
	 * @param organizationId
	 * @param accountId
	 * @return
	 * @throws OrganizationException
	 */
//	public boolean enable(
//			@WebParam(name = "organizationId") String organizationId,
//			@WebParam(name = "accountId") String accountId)
//			throws OrganizationException;

	/**
	 * 账号认证
	 * 
	 * @param uid
	 * @param password
	 * @return
	 * @throws OrganizationException
	 */
	public boolean authenticate(@WebParam(name = "uid") String uid,
			@WebParam(name = "password") String password)
			throws OrganizationException;

	/**
	 * 账号与本地人员绑定
	 * 
	 * @param organizationId
	 * @param accountId
	 * @param personId
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年6月15日
	 */
	public boolean bind(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "accountId") String accountId,
			@WebParam(name = "personId") String personId)
			throws OrganizationException;

}
